<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
		<meta name="viewport"
			content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
		<link rel="stylesheet" href="js/layui/css/layui.css" media="all">
		<title>个人中心</title>
		<style>
			body {
				text-align: center;
				margin-top: 20px;
			}

			.title {
				border: #5FB878 1px solid;
				margin-bottom: 30px;
			}


			.layui-input-block {
				margin-left: unset;
				padding: 10px;
			}
			.layui-textarea{
				min-height: 200px;
			}

			.back{
				margin-bottom: 3px;
				text-align: left;
			}
		</style>
	</head>
	<body>
		<div class="back">
			<button type="button" id="backBtn" class="layui-btn layui-btn-sm layui-btn-primary" style="border: none;">
				<i class="layui-icon layui-icon-left">返回</i>
			</button>
		</div>
		<div class="title">意见反馈</div>
		<div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					 <textarea name="desc" id="content" placeholder="请输入反馈内容" class="layui-textarea"></textarea>
				</div>
			</div>
			
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button id="commit" class="layui-btn" lay-submit lay-filter="*">提交</button>
				</div>
			</div>
		</div>
		</div>
		<script src="js/jquery.min.js"> </script>
		<script src="js/common.js"></script>
		<script>
			$(function() {

				$("#commit").on("click",function (){
					submit();
				});
				$("#backBtn").on("click", function() {
					window.location.href = "personal-center.html";
				});

			});

			function submit(){
				var data = {
					userId: 1,
					content: $("#content").val()
				}
				$.ajax({
					type: "post",
					dataType: "json",
					contentType: "application/json",
					url: baseUrl + "user/newFb.json",
					data: JSON.stringify(data),
					success: function(data) {
						if (data.code == "200") {
							window.location.href = "personal-center.html";
						} else {
							layer.msg("修改失败!", {
								icon: 5
							});
						}
					}
				});
			}
		</script>
	</body>
</html>
